package org.example.Polls;

import java.net.MalformedURLException;

public class SOAPServiceFactory implements ServiceFactory {
	
	//public static final String BASE_URL = "http://192.168.1.120:8080/hhpoll/services";
	public static final String BASE_URL = "https://iamsmitten.org/hhpoll/services";

	public UserService createUserService() {
		try {
			return new SOAPUserService(BASE_URL+"/UserService");
		} catch (MalformedURLException e) {
			throw new RuntimeException("Malformed URL");
		}
	}

	public PollService createPollService() {
		try {
			return new SOAPPollService(BASE_URL+"/PollService");
		} catch (MalformedURLException e) {
			throw new RuntimeException("Malformed URL");
		}
	}

}
